using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using Dal.Entities;

namespace Dal.Mapping
{
	public class Doc2Map : EntityTypeConfiguration<Doc2>
	{
		public Doc2Map()
		{
			// Primary Key
			this.HasKey(t => t.DocID);

			// Properties
			this.Property(t => t.DocID)
				.HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);
				
			this.Property(t => t.OldTreatment_2)
				.HasMaxLength(100);
				
			this.Property(t => t.Reason)
				.HasMaxLength(300);
				
			this.Property(t => t.AddtionReasonOther)
				.HasMaxLength(50);
				
			this.Property(t => t.AdditionReasonFrequence)
				.HasMaxLength(50);
				
			this.Property(t => t.AdditionCaseMedicineName1)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseMedicineCount1)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseMedicineTime1)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseMedicineName2)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseMedicineCount2)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseMedicineTime2)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseMedicineName3)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseMedicineCount3)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseMedicineTime3)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseMedicineName4)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseMedicineCount4)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseMedicineTime4)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseYDS)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseYDSDW1)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseYDSDW2)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseYDSDW3)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseYDSDW4)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseYDSDX1)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseYDSDX2)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseYDSDX3)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseYDSHNP)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseYDSCX)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseYDS301)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseYDS302)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseYDS501)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseYDS502)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseYDSLike301)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseYDSLike302)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseYDSLike303)
				.HasMaxLength(150);
				
			this.Property(t => t.AdditionCaseYDSQiTa)
				.HasMaxLength(150);
				
			// Table & Column Mappings
			this.ToTable("Doc2");
			this.Property(t => t.DocID).HasColumnName("DocID");
			this.Property(t => t.OldTreatment_2).HasColumnName("OldTreatment_2");
			this.Property(t => t.BloodSugarEmpty).HasColumnName("BloodSugarEmpty");
			this.Property(t => t.BloodSugarAfterDinner).HasColumnName("BloodSugarAfterDinner");
			this.Property(t => t.Hba1c).HasColumnName("Hba1c");
			this.Property(t => t.DetectDate).HasColumnName("DetectDate");
			this.Property(t => t.Reason).HasColumnName("Reason");
			this.Property(t => t.AddtionReasonOther).HasColumnName("AddtionReasonOther");
			this.Property(t => t.AdditionReasonFrequence).HasColumnName("AdditionReasonFrequence");
			this.Property(t => t.AdditionCaseMedicineName1).HasColumnName("AdditionCaseMedicineName1");
			this.Property(t => t.AdditionCaseMedicineCount1).HasColumnName("AdditionCaseMedicineCount1");
			this.Property(t => t.AdditionCaseMedicineTime1).HasColumnName("AdditionCaseMedicineTime1");
			this.Property(t => t.AdditionCaseMedicineName2).HasColumnName("AdditionCaseMedicineName2");
			this.Property(t => t.AdditionCaseMedicineCount2).HasColumnName("AdditionCaseMedicineCount2");
			this.Property(t => t.AdditionCaseMedicineTime2).HasColumnName("AdditionCaseMedicineTime2");
			this.Property(t => t.AdditionCaseMedicineName3).HasColumnName("AdditionCaseMedicineName3");
			this.Property(t => t.AdditionCaseMedicineCount3).HasColumnName("AdditionCaseMedicineCount3");
			this.Property(t => t.AdditionCaseMedicineTime3).HasColumnName("AdditionCaseMedicineTime3");
			this.Property(t => t.AdditionCaseMedicineName4).HasColumnName("AdditionCaseMedicineName4");
			this.Property(t => t.AdditionCaseMedicineCount4).HasColumnName("AdditionCaseMedicineCount4");
			this.Property(t => t.AdditionCaseMedicineTime4).HasColumnName("AdditionCaseMedicineTime4");
			this.Property(t => t.AdditionCaseYDS).HasColumnName("AdditionCaseYDS");
			this.Property(t => t.AdditionCaseYDSDW1).HasColumnName("AdditionCaseYDSDW1");
			this.Property(t => t.AdditionCaseYDSDW2).HasColumnName("AdditionCaseYDSDW2");
			this.Property(t => t.AdditionCaseYDSDW3).HasColumnName("AdditionCaseYDSDW3");
			this.Property(t => t.AdditionCaseYDSDW4).HasColumnName("AdditionCaseYDSDW4");
			this.Property(t => t.AdditionCaseYDSDX1).HasColumnName("AdditionCaseYDSDX1");
			this.Property(t => t.AdditionCaseYDSDX2).HasColumnName("AdditionCaseYDSDX2");
			this.Property(t => t.AdditionCaseYDSDX3).HasColumnName("AdditionCaseYDSDX3");
			this.Property(t => t.AdditionCaseYDSHNP).HasColumnName("AdditionCaseYDSHNP");
			this.Property(t => t.AdditionCaseYDSCX).HasColumnName("AdditionCaseYDSCX");
			this.Property(t => t.AdditionCaseYDS301).HasColumnName("AdditionCaseYDS301");
			this.Property(t => t.AdditionCaseYDS302).HasColumnName("AdditionCaseYDS302");
			this.Property(t => t.AdditionCaseYDS501).HasColumnName("AdditionCaseYDS501");
			this.Property(t => t.AdditionCaseYDS502).HasColumnName("AdditionCaseYDS502");
			this.Property(t => t.AdditionCaseYDSLike301).HasColumnName("AdditionCaseYDSLike301");
			this.Property(t => t.AdditionCaseYDSLike302).HasColumnName("AdditionCaseYDSLike302");
			this.Property(t => t.AdditionCaseYDSLike303).HasColumnName("AdditionCaseYDSLike303");
			this.Property(t => t.AdditionCaseYDSQiTa).HasColumnName("AdditionCaseYDSQiTa");
			this.Property(t => t.StatusAudit).HasColumnName("StatusAudit");
			this.Property(t => t.StatusComplete).HasColumnName("StatusComplete");
		}
	}
}

